<template>
    <div class="content">
        <div class="btns-box">
            <Button type="primary" @click="saveAdd">暂存</Button>
            <Button type="primary" v-if="form.id" @click="delAll">删除</Button>
            <div class="f-fr">
                <Button type="primary" @click="submitAll">申报</Button>
            </div>
        </div>

        <div class="content-body">
            <Form
                :model="form"
                :rules="formRules"
                :data-current="currentIndex"
                class="declare-form"
                ref="form"
                :show-message="false"
            >
                <Row>
                    <Col class="form-label" span="3">操作员</Col>
                    <Col span="3">
                    <FormItem prop="operator" class="formInput">
                        <Input disabled v-model="form.operator" />
                    </FormItem>
                    </Col>
                    <Col class="form-label label-top" span="3">操作单位</Col>
                    <Col span="3">
                    <FormItem prop="operatorUnit" class="formInput">
                        <Input disabled placeholder v-model="form.operatorUnit" />
                    </FormItem>
                    </Col>
                    <Col class="form-label label-top" span="3">海关十位编码</Col>
                    <Col span="9">
                    <FormItem prop="customsCode" class="formInput">
                        <Input disabled v-model="form.customsCode" />
                    </FormItem>
                    </Col>
                </Row>
                <Row>
                    <Col class="form-label" span="3">申报地海关</Col>
                    <Col span="9">
                    <FormItem prop="declPort" class="formInput requireBG">
                        <RemoteSearch
                            :disabled="editState"
                            v-model="form.declPort"
                            :list="customsCodeList"
                            keywordFiled="dataName"
                            valueField="dataCode"
                            :labelFieldList="['dataCode', 'dataName']"
                        ></RemoteSearch>
                    </FormItem>
                    </Col>

                    <Col class="form-label" span="3">申报状态</Col>
                    <Col span="9">
                    <FormItem prop="status" class="formInput">
                        <Input disabled>{{form.status}}</Input>
                    </FormItem>
                    </Col>
                </Row>
                <div class="base-info">
                    <h3>征免税备案</h3>
                </div>
                <!-- 第1行 -->
                <Row>
                    <Col class="form-label" span="3">预录入编号</Col>
                    <Col span="9">
                    <FormItem prop="preEntryId" class="formInput">
                        <Input disabled v-model="form.preEntryId" />
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">中心统一编号</Col>
                    <Col span="9">
                    <FormItem prop="centralUniformNumber" class="formInput">
                        <Input disabled placeholder v-model="form.centralUniformNumber" />
                    </FormItem>
                    </Col>
                </Row>
                <!-- 第2行 -->
                <Row>
                    <Col class="form-label" span="3">政策项目编号</Col>
                    <Col span="9">
                    <FormItem prop="policyItemNo" class="formInput">
                        <Input disabled v-model="form.policyItemNo" />
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">项目名称</Col>
                    <Col span="9">
                    <FormItem prop="projectName" class="formInput">
                        <Input disabled placeholder v-model="form.projectName" />
                    </FormItem>
                    </Col>
                </Row>
                <!-- 第3行 -->
                <Row>
                    <Col class="form-label" span="3">减免税申请人</Col>
                    <Col span="3">
                    <FormItem prop="proposerType" class="formInput">
                        <Select :disabled="editState" v-model="form.proposerType" class="small-select">
                            <Option
                                v-for="item in proposerTypes"
                                :key="item.dataCode"
                                :value="item.dataCode"
                            >{{item.dataName}}</Option>
                        </Select>
                    </FormItem>
                    </Col>
                    <Col span="3">
                    <FormItem prop="proposerSccCode" class="formInput">
                        <Input :disabled="editState" v-model="form.proposerSccCode" />
                    </FormItem>
                    </Col>
                    <Col span="3">
                    <FormItem prop="proposerCustCode" class="formInput">
                        <Input :disabled="editState" v-model="form.proposerCustCode" />
                    </FormItem>
                    </Col>
                    <Col span="12">
                    <FormItem prop="proposerName" class="formInput requireBG">
                        <Input :disabled="editState" placeholder="申请人名称" v-model="form.proposerName" />
                    </FormItem>
                    </Col>
                </Row>
                <!-- 第4行 -->
                <Row>
                    <Col class="form-label" span="3">合营外方</Col>
                    <Col span="3">
                    <FormItem prop="ventureForeign" class="formInput">
                        <Input :disabled="editState" v-model="form.ventureForeign" />
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">外方国别/地区</Col>
                    <Col span="3">
                    <FormItem prop="foreignCountry" class="formInput">
                        <RemoteSearch
                            :disabled="editState"
                            v-model="form.foreignCountry"
                            :list="countryRegionList"
                            keywordFiled="dataName"
                            valueField="dataCode"
                            :labelFieldList="['dataCode', 'dataName']"
                        ></RemoteSearch>
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">投资比例</Col>
                    <Col span="9">
                    <FormItem prop="investmentProportion" class="formInput">
                        <Input :disabled="editState" placeholder v-model="form.investmentProportion" />
                    </FormItem>
                    </Col>
                </Row>
                <!-- 第5行 -->
                <Row>
                    <Col class="form-label" span="3">合同协议号</Col>
                    <Col span="3">
                    <FormItem prop="contrNo" class="formInput">
                        <Input :disabled="editState" v-model="form.contrNo" />
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">项目批准文号</Col>
                    <Col span="3">
                    <FormItem prop="projectApprovalNumber" class="formInput">
                        <Input :disabled="editState" v-model="form.projectApprovalNumber" />
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">项目性质</Col>
                    <Col span="9">
                    <FormItem prop="projectNature" class="formInput">
                        <Select :disabled="editState" v-model="form.projectNature" class="small-select">
                            <Option
                                :disabled="editState"
                                v-for="(item) in projectNatures"
                                :key="item.dataCode"
                                :value="item.dataCode"
                            >{{item.dataName}}</Option>
                        </Select>
                    </FormItem>
                    </Col>
                </Row>
                <!-- 第6行 -->
                <Row>
                    <Col class="form-label" span="3">征免性质/代码</Col>
                    <Col span="3">
                    <FormItem prop="cutMode" class="formInput requireBG">
                        <RemoteSearch
                            :disabled="editState"
                            v-model="form.cutMode"
                            :list="cutModeList"
                            keywordFiled="dataName"
                            valueField="dataCode"
                            :labelFieldList="['dataCode', 'dataName']"
                        ></RemoteSearch>
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">立项日期</Col>
                    <Col span="3">
                    <FormItem prop="projectDate" class="formInput requireBG">
                        <Date-picker
                            :disabled="editState"
                            @on-change="form.projectDate=$event"
                            value="form.projectDate"
                            format="yyyy-MM-dd"
                            value-format="yyyy-MM-dd"
                            v-model="form.projectDate"
                            type="datetime"
                            placeholder
                        ></Date-picker>
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">开始日期</Col>
                    <Col span="3">
                    <FormItem prop="startDate" class="formInput requireBG">
                        <Date-picker
                            :disabled="editState"
                            @on-change="form.startDate=$event"
                            format="yyyy-MM-dd"
                            v-model="form.startDate"
                            type="datetime"
                            placeholder
                        ></Date-picker>
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">结束日期</Col>
                    <Col span="3">
                    <FormItem prop="endDate" class="formInput requireBG">
                        <Date-picker
                            :disabled="editState"
                            @on-change="form.endDate=$event"
                            format="yyyy-MM-dd"
                            v-model="form.endDate"
                            type="datetime"
                            placeholder
                        ></Date-picker>
                    </FormItem>
                    </Col>
                </Row>
                <!-- 第7行 -->
                <Row>
                    <Col class="form-label" span="3">征免主管部门/代码</Col>
                    <Col span="6">
                    <FormItem prop="competentUnit" class="formInput">
                        <Input :disabled="editState" v-model="form.competentUnit" />
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="6">投资项目自适用产业政策条目/代码</Col>
                    <Col span="9">
                    <FormItem prop="industrialPolicyEntry" class="formInput">
                        <Input :disabled="editState" v-model="form.industrialPolicyEntry" />
                    </FormItem>
                    </Col>
                </Row>
                <!-- 第8行 -->
                <Row>
                    <Col class="form-label" span="3">投资总额</Col>
                    <Col span="3">
                    <FormItem prop="investmentTotal" class="formInput requireBG">
                        <Input :disabled="editState" v-model="form.investmentTotal" />
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">投资总额币制</Col>
                    <Col span="3">
                    <FormItem prop="investmentCurr" class="formInput requireBG">
                        <RemoteSearch
                            :disabled="editState"
                            v-model="form.investmentCurr"
                            :list="currencyCodeList"
                            keywordFiled="dataName"
                            valueField="dataCode"
                            :labelFieldList="['dataCode', 'dataName']"
                        ></RemoteSearch>
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">用汇额度（美元）</Col>
                    <Col span="9">
                    <FormItem prop="foreignExchangeQuotas" class="formInput requireBG">
                        <inputNumber :disabled="editState" placeholder v-model="form.foreignExchangeQuotas" />
                    </FormItem>
                    </Col>
                </Row>
                <!-- 第9行 -->
                <Row>
                    <Col class="form-label" span="3">减免税额度（美元）</Col>
                    <Col span="9">
                    <FormItem prop="taxReliefsQuotas" class="formInput">
                        <Input :disabled="editState" v-model="form.taxReliefsQuotas" />
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">减免税额度（数量）</Col>
                    <Col span="3">
                    <FormItem prop="taxReliefsAmount" class="formInput">
                        <Input :disabled="editState" v-model="form.taxReliefsAmount" />
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">计量单位</Col>
                    <Col span="3">
                    <FormItem prop="operatorUnit" class="formInput">
                        <Input :disabled="editState" placeholder v-model="form.operatorUnit" />
                    </FormItem>
                    </Col>
                </Row>
                <!-- 第10行 -->
                <Row>
                    <Col class="form-label" span="3">联系人及电话</Col>
                    <Col span="9">
                    <FormItem prop="contactPhone" class="formInput requireBG">
                        <Input :disabled="editState" v-model="form.contactPhone" />
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">申请人所在地</Col>
                    <Col span="9">
                    <FormItem prop="operator" class="formInput requireBG">
                        <Input :disabled="editState" v-model="form.applicationLocation" />
                    </FormItem>
                    </Col>
                </Row>
                <!-- 第11行 -->
                <Row>
                    <Col class="form-label" span="3">申请形式</Col>
                    <Col span="3">
                    <FormItem prop="applicationForm" class="formInput requireBG">
                        <Select :disabled="editState" v-model="form.applicationForm" class="small-select">
                            <Option :value="1">无纸</Option>
                            <Option :value="2">有纸</Option>
                        </Select>
                    </FormItem>
                    </Col>
                    <Col span="12">
                    <el-checkbox v-model="single">申请随附单证纸本资料自行前往主管海关递交</el-checkbox>
                    <FormItem prop="selfSubmit" class="formInput">
                        <!--<Checkbox-group v-model="form.selfSubmit">
                <Checkbox :value="1">
                  <span>申请随附单证纸本资料自行前往主管海关递交</span>
                </Checkbox>
              </Checkbox-group>-->
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">注册资本</Col>
                    <Col span="3">
                    <FormItem prop="registeredCapital" class="formInput">
                        <Input :disabled="editState" v-model="form.registeredCapital" />
                    </FormItem>
                    </Col>
                </Row>
                <!-- 第12行 -->
                <Row>
                    <Col class="form-label" span="3">项目所在地</Col>
                    <Col span="12">
                    <FormItem prop="projectLocation" class="formInput requireBG">
                        <Input :disabled="editState" v-model="form.projectLocation" />
                    </FormItem>
                    </Col>

                    <Col class="form-label" span="6">注册资本币制</Col>
                    <Col span="3">
                    <FormItem prop="registeredCapitalCurr" class="formInput">
                        <RemoteSearch
                            :disabled="editState"
                            v-model="form.registeredCapitalCurr"
                            :list="currencyCodeList"
                            keywordFiled="dataName"
                            valueField="dataCode"
                            :labelFieldList="['dataCode', 'dataName']"
                        ></RemoteSearch>
                    </FormItem>
                    </Col>
                </Row>
                <!-- 第13行 -->
                <Row>
                    <Col class="form-label" span="3">备注</Col>
                    <Col span="21">
                    <FormItem prop="remarkTop" class="formInput">
                        <Input :disabled="editState" v-model="form.remarkTop" />
                    </FormItem>
                    </Col>
                </Row>
                <!-- 第14行 -->
                <Row>
                    <Col class="form-label" span="3">受托单位</Col>
                    <Col span="3">
                    <FormItem prop="operator" class="formInput">
                        <Input :disabled="editState" :maxlength="18" placeholder="18位信用代码" v-model="form.commissionedUnitSccCode" />
                    </FormItem>
                    </Col>
                    <Col span="3">
                    <FormItem prop="operator" class="formInput">
                        <Input :disabled="editState" placeholder="海关注册编码" v-model="form.commissionedUnitCustCode" />
                    </FormItem>
                    </Col>
                    <Col span="15">
                    <FormItem prop="operator" class="formInput">
                        <Input :disabled="editState" placeholder="受委托单位名称" v-model="form.commissionedUnitName" />
                    </FormItem>
                    </Col>
                </Row>

                <div class="base-info">
                    <h3>征免税证明</h3>
                </div>
                <!-- 第1行 -->
                <Row>
                    <Col class="form-label" span="3">预录入编号</Col>
                    <Col span="9">
                    <FormItem prop="preEntryId" class="formInput">
                        <Input disabled v-model="form.preEntryId" />
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">中心统一编号</Col>
                    <Col span="9">
                    <FormItem prop="centralUniformNumber" class="formInput">
                        <Input disabled placeholder v-model="form.centralUniformNumber" />
                    </FormItem>
                    </Col>
                </Row>
                <!-- 第2行 -->
                <Row>
                    <Col class="form-label" span="3">征免税证明编号</Col>
                    <Col span="9">
                    <FormItem prop="taxCollectionCertificateNo" class="formInput">
                        <Input disabled placeholder v-model="form.taxCollectionCertificateNo" />
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">政策项目编号</Col>
                    <Col span="9">
                    <FormItem prop="policyItemNo" class="formInput">
                        <Input disabled v-model="form.policyItemNo" />
                    </FormItem>
                    </Col>
                </Row>
                <!-- 第3行 -->
                <Row>
                    <Col class="form-label" span="3">免表类型</Col>
                    <Col span="3">
                    <FormItem prop="mbType" class="formInput">
                        <Input disabled placeholder v-model="form.mbType" />
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">征免性质/代码</Col>
                    <Col span="3">
                    <FormItem prop="cutMode" class="formInput requireBG">
                        <RemoteSearch
                            disabled
                            v-model="form.cutMode"
                            :list="cutModeList"
                            keywordFiled="dataName"
                            valueField="dataCode"
                            :labelFieldList="['dataCode', 'dataName']"
                        ></RemoteSearch>
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">有效日期</Col>
                    <Col span="9">
                    <FormItem prop="effectiveDate" class="formInput">
                        <Date-picker
                            :disabled="editState"
                            @on-change="form.effectiveDate=$event"
                            format="yyyy-MM-dd"
                            v-model="form.effectiveDate"
                            type="datetime"
                            placeholder
                        ></Date-picker>
                    </FormItem>
                    </Col>
                </Row>
                <!-- 第4行 -->
                <Row>
                    <Col class="form-label" span="3">项目性质</Col>
                    <Col span="3">
                    <FormItem prop="projectNature" class="formInput">
                        <Select disabled v-model="form.projectNature" class="small-select">
                            <Option
                                :disabled="editState"
                                v-for="(item) in projectNatures"
                                :key="item.dataCode"
                                :value="item.dataCode"
                            >{{item.dataName}}</Option>
                        </Select>
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">主管单位</Col>
                    <Col span="3">
                    <FormItem prop="competentUnit" class="formInput">
                        <Input :disabled="editState" placeholder v-model="form.competentUnit" />
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">免税物资确认表编号</Col>
                    <Col span="3">
                    <FormItem prop="dutyFreeGoodsConfirmNo" class="formInput">
                        <Input disabled placeholder v-model="form.dutyFreeGoodsConfirmNo" />
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">物资确认表有效期</Col>
                    <Col span="3">
                    <FormItem prop="goodsConfirmValidDate" class="formInput">
                        <Input disabled placeholder v-model="form.goodsConfirmValidDate" />
                    </FormItem>
                    </Col>
                </Row>
                <!-- 第5行 -->
                <Row>
                    <Col class="form-label" span="3">减免税申请人</Col>
                    <Col span="3">
                    <FormItem prop="proposerSccCode" class="formInput">
                        <Input disabled placeholder="18位信用代码" v-model="form.proposerSccCode" />
                    </FormItem>
                    </Col>

                    <Col span="3" prop="proposerCustCode">
                    <Input disabled placeholder="海关注册编码" v-model="form.proposerCustCode" />
                    </Col>
                    <Col span="15" prop="proposerName">
                    <Input disabled placeholder="申请人名称" v-model="form.proposerName" />
                    </Col>
                </Row>
                <!-- 第6行 -->
                <Row>
                    <Col class="form-label" span="3">收发货人</Col>
                    <Col span="3">
                    <FormItem prop="consigneeSccCode" class="formInput">
                        <Input :disabled="editState" placeholder="18位信用代码" v-model="form.consigneeSccCode" />
                    </FormItem>
                    </Col>

                    <Col span="3" prop="consigneeCustCode">
                    <Input :disabled="editState" placeholder="海关注册编码" v-model="form.consigneeCustCode" />
                    </Col>
                    <Col span="15" prop="consigneeName">
                    <Input :disabled="editState" placeholder="收发货人名称" v-model="form.consigneeName" />
                    </Col>
                </Row>
                <!-- 第7行 -->
                <Row>
                    <Col class="form-label" span="3">项目主管部门/代码</Col>
                    <Col span="6">
                    <FormItem prop="competentUnit" class="formInput">
                        <Input disabled v-model="form.competentUnit" />
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="6">投资项目自适用产业政策条目/代码</Col>
                    <Col span="9">
                    <FormItem prop="industrialPolicyEntry" class="formInput">
                        <Input :disabled="editState" v-model="form.industrialPolicyEntry" />
                    </FormItem>
                    </Col>
                </Row>
                <!-- 第8行 -->
                <Row>
                    <Col class="form-label" span="3">货物是否已向海关申报</Col>
                    <Col span="3">
                    <FormItem prop="declared" class="formInput requireBG">
                        <Select :disabled="editState" v-model="form.declared" class="small-select">
                            <Option :value="0">否</Option>
                            <Option :value="1">是</Option>
                        </Select>
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">合同号</Col>
                    <Col span="3">
                    <FormItem prop="contractNo" class="formInput">
                        <Input :disabled="editState" v-model="form.contractNo" />
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">政策依据</Col>
                    <Col span="9">
                    <FormItem prop="policyBasis" class="formInput">
                        <Input :disabled="editState" v-model="form.policyBasis" />
                    </FormItem>
                    </Col>
                </Row>
                <!-- 第9行 -->
                <Row>
                    <Col class="form-label" span="3">许可证编号</Col>
                    <Col span="9">
                    <FormItem prop="licenseNo" class="formInput">
                        <Input disabled v-model="form.licenseNo" />
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">进出口岸</Col>
                    <Col span="3">
                    <FormItem prop="iePort" class="formInput requireBG">
                        <RemoteSearch
                            :disabled="editState"
                            v-model="form.iePort"
                            :list="currencyCodeList"
                            keywordFiled="dataName"
                            valueField="dataCode"
                            :labelFieldList="['dataCode', 'dataName']"
                        ></RemoteSearch>
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">进（出）口标志</Col>
                    <Col span="3">
                    <FormItem prop="ieFlag" class="formInput requireBG">
                        <Select :disabled="editState" v-model="form.ieFlag" class="small-select">
                            <Option :value="1">进口</Option>
                            <Option :value="2">出口</Option>
                        </Select>
                    </FormItem>
                    </Col>
                </Row>

                <!-- 第10行 -->
                <Row>
                    <Col class="form-label" span="3">成交方式</Col>
                    <Col span="3">
                    <FormItem prop="transMode" class="formInput requireBG">
                        <RemoteSearch
                            :disabled="editState"
                            v-model="form.transMode"
                            :list="transModeList"
                            keywordFiled="dataName"
                            valueField="dataCode"
                            :labelFieldList="['dataCode', 'dataName']"
                        ></RemoteSearch>
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">运费</Col>
                    <Col span="1">
                    <FormItem prop="feeRate" class="formInput">
                        <Input :disabled="editState" v-model="form.feeRate" />
                    </FormItem>
                    </Col>
                    <Col span="1">
                    <FormItem prop class="formInput">
                        <Input :disabled="editState" />
                    </FormItem>
                    </Col>
                    <Col span="1">
                    <FormItem prop class="formInput">
                        <Input :disabled="editState" />
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">保费/率</Col>
                    <Col span="1">
                    <FormItem prop="insurRate" class="formInput">
                        <Input :disabled="editState" v-model="form.insurRate" />
                    </FormItem>
                    </Col>
                    <Col span="1">
                    <FormItem class="formInput">
                        <Input :disabled="editState" />
                    </FormItem>
                    </Col>
                    <Col span="1">
                    <FormItem prop class="formInput">
                        <Input :disabled="editState" />
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">杂费/率</Col>
                    <Col span="1">
                    <FormItem prop="otherRate" class="formInput">
                        <Input :disabled="editState" v-model="form.otherRate" />
                    </FormItem>
                    </Col>
                    <Col span="1">
                    <FormItem prop class="formInput">
                        <Input :disabled="editState" />
                    </FormItem>
                    </Col>
                    <Col span="1">
                    <FormItem prop class="formInput">
                        <Input :disabled="editState" />
                    </FormItem>
                    </Col>
                </Row>
                <!-- 第11行 -->
                <Row>
                    <Col class="form-label" span="3">联系人</Col>
                    <Col span="3">
                    <FormItem prop="contact" class="formInput requireBG">
                        <Input :disabled="editState" v-model="form.contact" />
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">手机</Col>
                    <Col span="3">
                    <FormItem prop="contactPhone" class="formInput requireBG">
                        <Input :disabled="editState" v-model="form.contactPhone" />
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">固定电话</Col>
                    <Col span="9">
                    <FormItem prop="tel" class="formInput requireBG">
                        <Input :disabled="editState" v-model="form.tel" />
                    </FormItem>
                    </Col>
                </Row>
                <!-- 第12行 -->
                <Row>
                    <Col class="form-label" span="3">申请形式</Col>
                    <Col span="3">
                    <FormItem prop="applicationForm" class="formInput requireBG">
                        <Select :disabled="editState" v-model="form.applicationForm" class="small-select">
                            <Option :value="1">无纸</Option>
                            <Option :value="2">有纸</Option>
                        </Select>
                    </FormItem>
                    </Col>
                    <Col span="9">
                    <el-checkbox v-model="single">申请随附单证纸本资料自行前往主管海关递交</el-checkbox>
                    <FormItem prop="selfSubmit" class="formInput">
                        <!--  <Checkbox-group v-model="form.selfSubmit">
                <Checkbox :value="1" >
                  <span>申请随附单证纸本资料自行前往主管海关递交</span>
                </Checkbox>
              </Checkbox-group>-->
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="6">是否按规定递交《减免税货物使用状况报告书》</Col>
                    <Col span="3">
                    <FormItem prop="submitCargoReport" class="formInput requireBG">
                        <Select :disabled="editState" v-model="form.submitCargoReport" class="small-select">
                            <Option :value="1">需要递交,已递交</Option>
                            <Option :value="2">需要递交,暂未递交</Option>
                            <Option :value="3">不需递交</Option>
                        </Select>
                    </FormItem>
                    </Col>
                </Row>
                <!-- 第13行 -->
                <Row>
                    <Col class="form-label" span="3">备注</Col>
                    <Col span="21">
                    <FormItem prop="remarkBottom" class="formInput">
                        <Input :disabled="editState" v-model="form.remarkBottom" />
                    </FormItem>
                    </Col>
                </Row>
            </Form>

            <div class="btns-box mt10">
                <Button type="primary" @click="addSh">新增</Button>
                <Button type="primary" @click="saveSh">暂存</Button>
                <Button @click="delSh">删除</Button>
            </div>
            <div class="mt10">
                <Table
                    border
                    :columns="columns"
                    highlight-row
                    @on-current-change="changeNowSh"
                    @on-selection-change="getSectedSh"
                    :data="this.form.goods"
                >

                </Table>
            </div>
            <div class="base-info">
                <h3>商品信息</h3>
            </div>
            <Form
                :model="goods"
                :rules="rules"
                :data-current="currentIndex"
                class="declare-form"
                ref="goods"
                :show-message="false"
            >
                <!-- 第1行 -->
                <Row>
                    <Col class="form-label" span="3">商品序号</Col>
                    <Col span="3">
                    <FormItem prop="idx " class="formInput">
                        <Input :disabled="editState" v-model="goods.idx" />

                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">商品编码</Col>
                    <Col span="3">
                    <FormItem prop="codeTs" class="formInput requireBG">
                        <Input :disabled="editState" v-model="goods.codeTs" />
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">商品规格型号</Col>
                    <Col span="9">
                    <FormItem prop="goodsModel " class="formInput">
                        <Input :disabled="editState" v-model="goods.goodsModel" />
                    </FormItem>
                    </Col>

                </Row>
                <!-- 第2行 -->
                <Row>
                    <Col class="form-label" span="3">商品名称</Col>
                    <Col span="9">
                    <FormItem prop="goodsName" class="form">
                        <Input :disabled="editState" v-model="goods.goodsName" />
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">申报数量</Col>
                    <Col span="3">
                    <FormItem prop="declNum" class="formInput requireBG">
                        <input-Number :disabled="editState" v-model="goods.declNum" />
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">申报计量单位</Col>
                    <Col span="3">
                    <FormItem prop="declUnit" class="formInput requireBG">
                        <Input :disabled="editState" v-model="goods.declUnit" />
                    </FormItem>
                    </Col>

                </Row>
                <!-- 第3行 -->
                <Row>
                    <Col class="form-label" span="3">法定数量</Col>
                    <Col span="3">
                    <FormItem prop="firstQty" class="formInput">
                        <inputNumber :disabled="editState" v-model="goods.firstQty" />
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">法定计量单位</Col>
                    <Col span="3">
                    <FormItem prop="firstUnit" class="formInput">
                        <Input :disabled="editState" v-model="goods.firstUnit" />
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">第二数量</Col>
                    <Col span="3">
                    <FormItem prop="secondQty" class="formInput">
                        <Input :disabled="editState" v-model="goods.secondQty" />
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">第二计量单位</Col>
                    <Col span="3">
                    <FormItem prop="secondUnit" class="formInput">
                        <Input :disabled="editState" v-model="goods.secondUnit" />
                    </FormItem>
                    </Col>

                </Row>
                <!-- 第4行 -->
                <Row>
                    <Col class="form-label" span="3">成交总价</Col>
                    <Col span="3">
                    <FormItem prop="declTotal" class="formInput requireBG">
                        <inputNumber :disabled="editState" v-model="goods.declTotal" />
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">币制</Col>
                    <Col span="3">
                    <FormItem prop="curr" class="formInput requireBG">
                        <RemoteSearch
                            :disabled="editState"
                            v-model="goods.curr"
                            :list="currencyCodeList"
                            keywordFiled="dataName"
                            valueField="dataCode"
                            :labelFieldList="['dataCode', 'dataName']"
                        ></RemoteSearch>
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">原产地(地区)</Col>
                    <Col span="3">
                    <FormItem prop="origPlaceCode " class="formInput requireBG">
                        <Input :disabled="editState" v-model="goods.origPlaceCode" />
                    </FormItem>
                    </Col>
                    <Col class="form-label" span="3">技术指标</Col>
                    <Col span="3">
                    <FormItem prop="technicalIndicators" class="formInput requireBG">
                        <Input :disabled="editState" v-model="goods.technicalIndicators" />
                    </FormItem>
                    </Col>

                </Row>
                <!-- 第5行 -->
                <Row>
                    <Col class="form-label" span="3">备注</Col>
                    <Col span="21">
                    <FormItem prop="remark" class="formInput">
                        <Input :disabled="editState" v-model="goods.remark" />
                    </FormItem>
                    </Col>
                </Row>
            </Form>

        </div>
        <Modal title="添加试卷" :width="900" v-model="vs" @on-ok="ok" @on-cancel="cancel">
            <div class="clearfix">
                <Form class="f-fl" inline :label-width="150">
                    <FormItem label="商品代码">
                        <Input :disabled="editState" v-model="params.code" placeholder></Input>
                    </FormItem>
                    <FormItem label="商品名称">
                        <Input :disabled="editState" v-model="params.name" placeholder></Input>
                    </FormItem>
                    <Button type="primary" @click="queryList">搜索</Button>
                </Form>
            </div>
            <Table
                ref="ta"
                :data="qList"
                :columns="qColumns"
                highlight-row
                @on-current-change="changeSelect"
            >
                <template slot="nd">
                    <span>2020</span>
                </template>
                <template slot="action">
                    <span>-</span>
                </template>
            </Table>
            <div class="content-footer">
                <Pagination
                    :pageSize.sync="params.pageSize"
                    :current.sync="params.pageNum"
                    :total="params.total"
                    @change="queryList"
                />
            </div>
        </Modal>
    </div>
</template>
<script>
import moment from 'moment'
import { mapState, mapMutations } from 'vuex'
import { queryTeacherList } from '@/api/userManage'
import {
    queryCode,
    licenceExportDel
} from '@/api/licence'
import { updateReliefs, getReliefsDetail } from '@/api/reliefs'
import $ from 'jquery'
import { getDicByKey } from '@/libs/getDicDataList'
export default {
    inject: ['nextPageReload'],
    props: {
        id: {
            type: String,
            default: ''
        }
    },
    data () {
        return {
            a: 'a',
            editState: false,
            checked: false,
            shStatus: 0,
            selectedSh: [],
            transModeList: [], // 成交方式
            currencyCodeList: [], // 币制
            projectNatures: [
                { dataCode: 1, dataName: '中外合资' },
                { dataCode: 2, dataName: '中外合作' },
                { dataCode: 3, dataName: '外商独资' },
                { dataCode: 4, dataName: '外商政府贷款' },
                { dataCode: 5, dataName: '国际金融组织贷款' },
                { dataCode: 6, dataName: '国内投资基建' },
                { dataCode: 7, dataName: '国内投资技改' },
                { dataCode: 8, dataName: '外资研发中心' },
                { dataCode: 9, dataName: '外资中西部优势产业、项目' },
                { dataCode: 10, dataName: '外国政府贷款中标' },
                { dataCode: 11, dataName: '国际金融组织贷款中标' },
                { dataCode: 12, dataName: '中西部外商投资' },
                { dataCode: 13, dataName: '国内投资鼓励项目' },
                { dataCode: 14, dataName: '外资项目内资商品' }
            ],
            proposerTypes: [
                { dataCode: 1, dataName: '国有' },
                { dataCode: 2, dataName: '合作' },
                { dataCode: 3, dataName: '合资' },
                { dataCode: 4, dataName: '独资' },
                { dataCode: 5, dataName: '集体' },
                { dataCode: 6, dataName: '私营' },
                { dataCode: 7, dataName: '个体工商户' },
                { dataCode: 8, dataName: '报关' },
                { dataCode: 9, dataName: '其他' }
            ],
            cutModeList: [],
            statusT: {
                0: '暂存',
                1: '申报'
            },
            qList: [],
            params: {
                code: '',
                name: '',
                pageNum: 1,
                pageSize: 10,
                total: 0
            },
            vs: false,
            now: {},
            goods: {
                idx: 1,
                codeTs: null,
                goodsModel: null,
                goodsName: null,
                declNum: null,
                declUnit: null,
                firstQty: null,
                firstUnit: null,
                secondQty: null,
                secondUnit: null,
                declTotal: null
            },
            nowSh: null,
            goodStatus: 0,
            selected: [],
            btnDisabled: false,
            countryRegionList: [], // 进口国别
            customsCodeList: [], // 报关
            transportList: [
                { id: '1', name: '海上运输' },
                { id: '2', name: '铁路运输' },
                { id: '3', name: '公路运输' },
                { id: '4', name: '航空运输' },
                { id: '5', name: '邮政运输' },
                { id: '6', name: '海运陆运' },
                { id: '7', name: '固定运输' },
                { id: '8', name: '内河运输' },
                { id: '9', name: '海运空运' }
            ], // 运输方式
            payTypeList: [
                { id: '0', name: '信用证' },
                { id: '1', name: '托收' },
                { id: '2', name: '汇付' },
                { id: '3', name: '本票' },
                { id: '4', name: '现金' },
                { id: '5', name: '记账' },
                { id: '6', name: '免费' }
            ], // 付款方式
            columns: [
                {
                    type: 'selection',
                    width: 60,
                    align: 'center'
                },
                {
                    title: '序号',
                    key: 'idx',
                    width: 60,
                    align: 'center'
                },
                {
                    title: '商品编号',
                    key: 'codeTs',
                    align: 'center'
                },
                {
                    title: '商品名称',
                    key: 'goodsName',
                    align: 'center'
                },
                {
                    title: '数量',
                    key: 'declNum',
                    align: 'center'
                },
                {
                    title: '单位',
                    key: 'declUnit',
                    align: 'center'
                },
                {
                    title: '总价',
                    key: 'declTotal',
                    align: 'center'
                },
                {
                    title: '币制',
                    key: 'curr',
                    align: 'center'
                }
            ],
            qColumns: [
                {
                    title: '序号',
                    type: 'index',
                    width: 60,
                    align: 'center'
                },
                {
                    title: '年度',
                    slot: 'nd',
                    align: 'center'
                },
                {
                    title: '进口商品代码',
                    key: 'codeTs',
                    align: 'center'
                },
                {
                    title: '商品名称',
                    key: 'goodsName',
                    align: 'center'
                },
                {
                    title: '计量单位',
                    key: 'unit',
                    align: 'center'
                },
                {
                    title: '商品目录',
                    slot: 'action',
                    align: 'center'
                }
            ],
            currentIndex: 0,
            cName: '', // 公司中文名称
            bit: '%',
            usd: 'USD',
            form: {
                operator: null, // 操作员
                operatorUnit: null, // 操作单位
                customsCode: null, // 海关十位编码
                declPort: null, // 申报地海关
                status: null, // 申报状态

                preEntryId: null, // 预录入编号
                centralUniformNumber: null, // 中心统一编号
                policyItemNo: null, // 政策项目编号
                projectName: null, // 项目名称
                proposerType: null,
                proposerSccCode: null,
                proposerCustCode: null,
                ventureForeign: null, // 合营外方
                foreignCountry: null, // 外方国别/地区
                investmentProportion: null, // 投资比例
                contrNo: null, // 合同协议号
                projectApprovalNumber: null, // 项目批准文号
                projectNature: null, // 项目性质
                cutMode: null, // 征免性质
                projectDate: null, // 立项日期
                startDate: null, // 开始日期
                endDate: null, // 结束时间
                competentUnit: null, //
                industrialPolicyEntry: null, // 投资项目自适用产业政策条目/代码
                investmentTotal: null, // 投资总额
                investmentCurr: null, // 投资总额币制
                foreignExchangeQuotas: null, // 用汇额度（美元）
                taxReliefsQuotas: null, // 减免税额度（美元
                taxReliefsAmount: null, // 减免税额度（数量）
                contactPhone: null, // 联系人及电话
                applicationLocation: null, // 申请人所在地
                applicationForm: null, // 申请形式
                selfSubmit: null, //
                registeredCapital: null, // 注册资本
                projectLocation: null, // 项目所在地
                registeredCapitalCurr: null, // 注册资本币制
                remarkTop: null, // 备注
                commissionedUnitSccCode: null,
                commissionedUnitCustCode: null,
                commissionedUnitName: null,
                taxCollectionCertificateNo: null, // 征免税证明编号
                effectiveDate: null, // 有效日期
                mbType: '一表一证', //
                dutyFreeGoodsConfirmNo: null, // 免税物资确认表编号
                goodsConfirmValidDate: null, // 物资确认表有效期
                consigneeCustCode: null, // 收发货人海关注册编码
                consigneeName: null, // 收发货人名称
                consigneeSccCode: null, // 收发货人18位信用代码
                declared: null,
                contractNo: null,
                policyBasis: null,
                licenseNo: null,
                iePort: null,
                ieFlag: null,
                transMode: null,
                feeRate: null,
                insurRate: null,
                contact: null,
                tel: null,
                submitCargoReport: null,
                remarkBottom: null,
                proposerName: null,
                goods: []
            },
            formRules: {
                declPort: [
                    {
                        required: true,
                        message: '',
                        trigger: 'blur'
                    }
                ],

                proposerName: [
                    {
                        required: true,
                        message: '',
                        trigger: 'blur'
                    }
                ],
                cutMode: [
                    {
                        required: true,
                        message: '',
                        trigger: 'blur'
                    }
                ],
                projectDate: [
                    {
                        required: true,
                        message: '',
                        trigger: 'blur'
                    }
                ], // 立项日期
                startDate: [
                    {
                        required: true,
                        message: '',
                        trigger: 'blur'
                    }
                ], // 开始日期
                endDate: [
                    {
                        required: true,
                        message: '',
                        trigger: 'blur'
                    }
                ], // 结束时间
                investmentTotal: [
                    {
                        required: true,
                        message: '',
                        trigger: 'blur'
                    }
                ], // 投资总额
                investmentCurr: [
                    {
                        required: true,
                        message: '',
                        trigger: 'blur'
                    }
                ], // 投资总额币制
                foreignExchangeQuotas: [
                    {
                        type: 'number',
                        required: true,
                        message: 0,
                        trigger: 'blur'
                    }
                ], // 用汇额度（美元）
                contactPhone: [
                    {
                        type: Number,
                        required: true,
                        message: 0,
                        trigger: 'blur'
                    }
                ], // 联系人及电话
                applicationLocation: [
                    {
                        required: true,
                        message: '',
                        trigger: 'blur'
                    }
                ], // 申请人所在地
                applicationForm: [
                    {
                        type: 'number',
                        required: true,
                        message: '',
                        trigger: 'blur'
                    }
                ], // 申请形式number
                projectLocation: [
                    {
                        required: true,
                        message: '',
                        trigger: 'blur'
                    }
                ], //
                contact: [
                    {
                        required: true,
                        message: '',
                        trigger: 'blur'
                    }
                ],
                tel: [
                    {
                        required: true,
                        message: '',
                        trigger: 'blur'
                    }
                ],
                declared: [
                    {
                        type: 'number',
                        required: true,
                        message: '',
                        trigger: 'blur'
                    }
                ],
                transMode: [
                    {
                        required: true,
                        message: '',
                        trigger: 'blur'
                    }
                ]
            },
            rules: {
                codeTs: [
                    {
                        required: true,
                        message: '',
                        trigger: 'blur'
                    }
                ],
                declNum: [
                    {
                        type: 'number',
                        required: true,
                        message: '',
                        trigger: 'blur'
                    }
                ],
                declUnit: [
                    {
                        required: true,
                        message: '',
                        trigger: 'blur'
                    }
                ],
                declTotal: [
                    {
                        type: 'number',
                        required: true,
                        message: '',
                        trigger: 'blur'
                    }
                ],
                curr: [
                    {
                        required: true,
                        message: '',
                        trigger: 'blur'
                    }
                ],
                origPlaceCode: [
                    {
                        required: true,
                        message: '',
                        trigger: 'blur'
                    }
                ],
                technicalIndicators: [
                    {
                        required: true,
                        message: '',
                        trigger: 'blur'
                    }
                ]
            },
            tips: {
                feeRate: ''
            },
            tradeModeList: [
                { id: '10', name: '一般贸易' },
                { id: '11', name: '易货贸易' },
                { id: '12', name: '补偿贸易' },
                { id: '13', name: '协定贸易' },
                { id: '14', name: '进料加工' },
                { id: '15', name: '来料加工' },
                { id: '16', name: '出料加工' },
                { id: '17', name: '寄售贸易' },
                { id: '18', name: '国际租赁' },
                { id: '19', name: '边境贸易' },
                { id: '20', name: '转口贸易' },
                { id: '21', name: '许可贸易' },
                { id: '22', name: '期货贸易' },
                { id: '23', name: '承包工程' },
                { id: '24', name: '国际招标' },
                { id: '25', name: '国际展览' },
                { id: '26', name: '国际拍卖' },
                { id: '27', name: '国际贷款进口' },
                { id: '28', name: '归还贷款出口' },
                { id: '29', name: '外资企业进口' }
            ],
            originStandardList: [
                { id: 'F', name: 'F' },
                { id: 'P', name: 'P' },
                { id: 'PK', name: 'PK' },
                { id: 'W', name: 'W' },
                { id: 'Y', name: 'Y' }
            ]
        }
    },
    computed: {
        ...mapState({
            isTeacher: (state) => state.user.roleType === '3',
            userId: (state) => state.user.userId
        }),
        single () {
            if (this.form.applicationForm == 2) {
                return true
            } else {
                return false
            }
        }
    },
    watch: {
        // test (val) {
        //     console.log(val)
        // if (val.applicationForm == 1) {
        //     console.log('无纸')
        // } else if (val.applicationForm == 2) {
        //     console.log('有纸')
        // }
        // }
    },
    mounted () {
        let id = this.$route.query.id
        let onlyLook = this.$route.query.onlyLook
        this.editState = !!onlyLook
        if (id) {
            getReliefsDetail(id).then((res) => {
                console.log(res)
                this.form = Object.assign(this.form, res.data.data)
                // this.form.list = res.data.data.list;
                this.form.projectDate = moment(this.form.projectDate).format('YYYY-MM-DD')
                console.log(this.form.projectDate)
            })
        } else {

            // this.form.operator = JSON.parse(localStorage.userinfo).userName;
        }
        let that = this
        let h = $
        if (this.$el) {
            $(this.$el).on('keyup', 'input', function (e) {
                if (e.keyCode == 13) {
                    var index = h('input:text').index(h(e.target))
                    console.log(index)
                    that.getInput(index)
                }
            })
        }
        this.getCountryRegionList()
        this.getCustomsCodeList()
        this.getCutModeList()
        this.getBZList()
        this.getTransModeList()
    },
    methods: {
        ...mapMutations(['removeTagNav']),
        // 成交方式
        getTransModeList () {
            return getDicByKey('TRANS_MODE').then((list) => {
                this.transModeList = Object.freeze(list)
            })
        },
        // 获取币制关别
        getBZList () {
            return getDicByKey('CURRENCY_CODE').then((list) => {
                this.currencyCodeList = Object.freeze(list)
            })
        },
        // 贸易国
        getCountryRegionList () {
            return getDicByKey('COUNTRY_REGION').then((list) => {
                this.countryRegionList = Object.freeze(list)
            })
        },
        // 报关区域
        getCustomsCodeList () {
            return getDicByKey('CUSTOMS_CODE').then((list) => {
                this.customsCodeList = Object.freeze(list)
            })
        },
        // 征免
        getCutModeList () {
            return getDicByKey('CUT_MODE').then((list) => {
                this.cutModeList = Object.freeze(list)
            })
        },
        changeSelect (data) {
            this.now = data
            console.log(data)
        },
        saveOne (index) {
            console.log(index)
            this.form.goods[index].status = 1
        },
        addGood () {},
        queryList () {
            queryCode({
                name: this.params.name,
                code: this.params.code,
                pageSize: this.params.pageSize,
                pageNum: this.params.pageNum
            }).then((res) => {
                this.qList = res.data.data.list
                this.params.total = res.data.data.total
            })
        },
        openModal () {
            this.vs = true
            this.queryList()
        },
        ok () {
            this.form.commodityCode = this.now.codeTs
            this.form.commodityName = this.now.goodsName
            this.form.commodityUnit = this.now.unit
        },
        cancel () {},
        getInput (index) {
            var h = $
            h('input:text')[index + 1].focus()
        },
        handleDateChange (v, key) {
            this.form[key] = v
        },
        getAdd () {},
        saveAdd () {
            this.form.status = 1
            updateReliefs(this.form).then((res) => {
                if (res.data.code != '0000') {
                    this.$Message.error(res.data.data)
                    return
                }
                this.$Message.success('成功')
                this.nextPageReload()
                this.$router.push({
                    name: 'reliefsList'
                })
            })
        },
        queryTeaList () {
            return queryTeacherList({
                pageNum: 1,
                pageSize: 9999
            }).then((res) => {
                if (res.data.code === '0000') {
                    const data = res.data.data
                    this.teaList = Object.freeze(
                        data.list.map((item) => ({
                            value: item.userId,
                            label: item.realName
                        }))
                    )
                }
            })
        },
        handleCancel () {
            this.removeTagNav(this.$route)
            this.$router.replace({
                name: 'classManageList'
            })
        },
        clearAll () {
            this.nextPageReload()
            this.$router.push({
                name: 'certAdd'
            })
        },
        submitAll () {
            this.$refs.form.validate((v) => {
                if (v) {
                    this.form.status = 2 // 申报
                    updateReliefs(this.form).then((res) => {
                        if (res.data.code != '0000') {
                            this.$Message.error(res.data.msg)
                            return
                        }
                        this.$Message.success('成功')
                        this.nextPageReload()
                        this.$router.push({
                            name: 'reliefsList'
                        })
                    })
                }
            })
        },
        makeFileAll () {},
        delAll () {
            licenceExportDel({ ids: this.form.id }).then((res) => {
                if (res.data.code === '0000') {
                    this.$Message.success('删除成功')
                    this.nextPageReload()
                    this.$router.push({
                        name: 'licenceExport'
                    })
                } else {
                    this.$Message.error(res.data.msg)
                }
            })
        },
        // 商品
        addSh () {
            let arr = []
            Object.keys(this.goods).forEach(key => {
                if (arr.indexOf(key) > -1) {
                    this.goods[key] = null
                } else {
                    this.goods[key] = null
                }
            })
            this.goods.idx = this.form.goods.length + 1
            this.shStatus = 0
        },
        saveSh () {
            this.$refs.goods.validate((v) => {
                if (v) {
                    var objString = JSON.stringify(this.goods)
                    var obj2 = JSON.parse(objString)
                    if (this.shStatus) {
                        this.form.goods.splice(this.nowSh, 1, obj2)
                    } else {
                        this.form.goods.push(obj2)
                        this.addSh()
                        this.goods.idx = this.form.goods.length + 1
                    }
                }
            })
        },
        delSh () {
        // 先删除
            this.selectedSh.map((item) => {
                this.form.goods.splice(item.idx - 1, 1)
            })
            // 再重新设置索引
            this.form.goods.map((item, i) => {
                item.idx = i + 1
            })
            this.goods.idx = this.form.goods.length + 1
            this.shStatus = 0
        },
        changeNowSh (data) {
            this.nowSh = data.idx - 1
            var str = JSON.stringify(data)
            var obj = JSON.parse(str)
            this.goods = obj
            this.shStatus = 1
        },
        getSectedSh (data) {
            this.selectedSh = data
        }
    }
}
</script>
<style lang="less">
.small-select {
  height: 20px;
  line-height: 20px;
  .ivu-select-selection {
    height: 20px;
    line-height: 20px;
    border-radius: 0px;
  }
  .ivu-select-single .ivu-select-selection .ivu-select-placeholder,
  .ivu-select-single .ivu-select-selection .ivu-select-selected-value {
    height: 20px;
    line-height: 20px;
  }
}
.h63 {
  height: 63px;
  line-height: 63px;
  textarea {
    height: 63px !important;
  }
}
.h70 {
  textarea {
    height: 76px !important;
  }
}
</style>
<style lang="less" scoped>
.h63 {
  height: 63px;
  line-height: 63px;
  .ivu-input {
    height: 63px;
  }
}
.label-bottom {
  border-bottom: 1px solid #b7b7b7;
}
.label-left {
  border-left: 1px solid #b7b7b7;
}
.m-1 {
  margin-top: -2px !important;
}
.label-top {
  border-top: 1px solid #b7b7b7;
}
.label-border {
  border-top: 1px solid #b7b7b7;
  border-left: 1px solid #b7b7b7;
}
.label-border-noleft {
  border-top: 1px solid #b7b7b7;
}
.btns-box {
  .ivu-btn {
    font-size: 12px;
    height: 24px;
    line-height: 12px;
    padding: 3px 14px;
    font-family: "Microsoft YaHei";
    border-radius: 2px;
  }
  button {
    margin-right: 1px;
    margin-bottom: 1px;
  }
}
.content-body {
  margin-top: 8px;
  width: 100%;
  position: relative;
  overflow: hidden;
}
.formInput {
  textarea {
    width: 100%;
    height: 63px;
    border-color: #b7b7b7;
  }
  select {
    height: 20px;
    line-height: 20px;
  }
}
.base-info {
  margin-top: 10px;
  h3 {
    color: #1291cc;
    font-size: 13px;
  }
}
.h70 {
  height: 76px;
  line-height: 76px;
  textarea {
    height: 76px;
  }
}
.mt10 {
  margin-top: 10px;
}
.input{
        margin-left: 15px;

}
</style>
